package top.ysez.product.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * ping
 *
 * @author YsEz
 * @version V1.0.0
 * @date 2022/6/3 13:41
 */
@RestController
@RequestMapping("/")
public class PingController {
    @RequestMapping(value = "/ping", method = RequestMethod.GET)
    public String ping() {
        String dataTimeStr =
                DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分ss秒SSS毫秒").format(LocalDateTime.now());
        return "pong--Product:当前的日期是------>" + dataTimeStr;
    }
}
